<?php
/**
 * Created by PhpStorm.
 * User: 汪凤杰
 * Date: 2017/11/9
 * Time: 14:51
 */

namespace JSSDK\Result;

use JSSDK\Model\YFAccessToken;

class AccessTokenResult extends Result
{
    /**
     * @return UserInfoResult
     */
    protected function parseDataFromResponse()
    {
        $content = $this->rawResponse->body;
        $json = json_decode($content,true);
        if($json['access_token']){
            new YFAccessToken($json);
        }
        return $json;
    }
}